<div class="form__wrapper">
  <div class="card">
    <div class="card-divider">
      <h2 class="card-title justify-between">
        <span class="text-black font-bold"><%= t("decidim.elections.admin.dashboard.main.title") %></span>
        <%= link_to edit_election_path(election), class: "flex items-end justify-between gap-x-3 text-sm" do %>
          <%= icon "pencil-line", class: "!w-4 !h-4" %>
          <%= t("actions.edit", scope: "decidim.admin") %>
        <% end %>
      </h2>
    </div>

    <div class="card-section">
      <div class="row column my-2">
        <h3 class="h6"><%= t("labels.title", scope: "decidim.elections.admin.dashboard.main") %></h3>
        <div><%= translated_attribute election.title %></div>
      </div>
      <div class="row column my-2">
        <h3 class="h6"><%= t("labels.description", scope: "decidim.elections.admin.dashboard.main") %></h3>
        <div><%= decidim_sanitize_translated election.description %></div>
      </div>
      <div class="row column my-2">
        <% if election.photos.any? %>
          <%= render partial: "decidim/elections/admin/dashboard/photos", locals: { election: } %>
        <% end %>
      </div>
      <div class="row column my-2">
        <h3 class="h6"><%= t("labels.calendar", scope: "decidim.elections.admin.dashboard.main") %></h3>
        <div><%= election.manual_start? ? t("decidim.elections.admin.dashboard.calendar.manual_start") : l(election.start_at, format: :decidim_short) %> - <%= l(election.end_at, format: :decidim_short) %></div>
      </div>
      <div class="row column">
        <h3 class="h6"><%= t("labels.results", scope: "decidim.elections.admin.dashboard.main") %></h3>
        <div>
          <%= t("decidim.elections.admin.elections.form.results_availability.#{election.results_availability}") %>
          (<%= t("decidim.elections.admin.elections.form.results_availability.#{election.results_availability}_help") %>)
        </div>
      </div>
    </div>
  </div>
</div>
